package user

import (
	"day12_12_homework/internal/api/user"
	"day12_12_homework/internal/middle"
	"github.com/gin-gonic/gin"
)

func UserRouter(c *gin.RouterGroup) {
	userRouter := c.Group("/user")
	{
		userRouter.POST("/register", user.UserRegister)
		userRouter.POST("/login", user.UserLogin)
		userRouter.Use(middle.AuthMiddleware())
		{
			userRouter.POST("/del", user.DelUser)
			userRouter.POST("/real", user.RealName)
		}
	}
}
